/*
 * Powered By [Seven]
 * Since 2016 - 2019
 */


package com.czmh.etc.onlinepubsys.model;
import org.apache.commons.lang.builder.EqualsBuilder;
import org.apache.commons.lang.builder.HashCodeBuilder;
import org.apache.commons.lang.builder.ToStringBuilder;
import org.apache.commons.lang.builder.ToStringStyle;
/**
 * 
 * @描述：
 * @author： Seven.
 * @创建日期：Jun 9, 2019 11:31:59 PM.
 * @版本：1.0.0
 */
public class EtcIdcard extends BaseModel {
	
	//alias
	public static final String TABLE_ALIAS = "EtcIdcard";
	public static final String ALIAS_ID = "主键ID";
	public static final String ALIAS_USER_ID = "用户ID";
	public static final String ALIAS_ADDRESS = "地址信息";
	public static final String ALIAS_NAME = "姓名";
	public static final String ALIAS_NATIONALITY = "民族";
	public static final String ALIAS_NUM = "身份证号";
	public static final String ALIAS_SEX = "性别";
	public static final String ALIAS_BIRTH = "出生日期";
	public static final String ALIAS_START_DATE = "有效期起始时间";
	public static final String ALIAS_END_DATE = "有效期结束时间";
	public static final String ALIAS_ISSUE = "签发机关";
	public static final String ALIAS_CREATE_TIME = "创建时间";
	public static final String ALIAS_UPDATE_TIME = "更新时间";
	 
	//可以直接使用: @Length(max=50,message="用户名长度不能大于50")显示错误消息
	//columns START
	private java.lang.String id;
	private java.lang.String user_id;
	private java.lang.String address;
	private java.lang.String name;
	private java.lang.String nationality;
	private java.lang.String num;
	private java.lang.String sex;
	private java.lang.String birth;
	private java.lang.String start_date;
	private java.lang.String end_date;
	private java.lang.String issue;
	private java.util.Date create_time;
	private java.util.Date update_time;
	//columns END

	public EtcIdcard(){
	}

	public EtcIdcard(
		java.lang.String id
	){
		this.id = id;
	}

	/**  
	 * 设置主键ID  
	 * @param id 主键ID  
	 */  
	public void setId(java.lang.String id) {
		this.id = id;
	}
	
	/**  
	 * 获取主键ID   
	 * @return id 主键ID   
	 */
	public java.lang.String getId() {
		return this.id;
	}
	/**  
	 * 设置用户ID  
	 * @param user_id 用户ID  
	 */  
	public void setUser_id(java.lang.String user_id) {
		this.user_id = user_id;
	}
	
	/**  
	 * 获取用户ID   
	 * @return user_id 用户ID   
	 */
	public java.lang.String getUser_id() {
		return this.user_id;
	}
	/**  
	 * 设置地址信息  
	 * @param address 地址信息  
	 */  
	public void setAddress(java.lang.String address) {
		this.address = address;
	}
	
	/**  
	 * 获取地址信息   
	 * @return address 地址信息   
	 */
	public java.lang.String getAddress() {
		return this.address;
	}
	/**  
	 * 设置姓名  
	 * @param name 姓名  
	 */  
	public void setName(java.lang.String name) {
		this.name = name;
	}
	
	/**  
	 * 获取姓名   
	 * @return name 姓名   
	 */
	public java.lang.String getName() {
		return this.name;
	}
	/**  
	 * 设置民族  
	 * @param nationality 民族  
	 */  
	public void setNationality(java.lang.String nationality) {
		this.nationality = nationality;
	}
	
	/**  
	 * 获取民族   
	 * @return nationality 民族   
	 */
	public java.lang.String getNationality() {
		return this.nationality;
	}
	/**  
	 * 设置身份证号  
	 * @param num 身份证号  
	 */  
	public void setNum(java.lang.String num) {
		this.num = num;
	}
	
	/**  
	 * 获取身份证号   
	 * @return num 身份证号   
	 */
	public java.lang.String getNum() {
		return this.num;
	}
	/**  
	 * 设置性别  
	 * @param sex 性别  
	 */  
	public void setSex(java.lang.String sex) {
		this.sex = sex;
	}
	
	/**  
	 * 获取性别   
	 * @return sex 性别   
	 */
	public java.lang.String getSex() {
		return this.sex;
	}
	/**  
	 * 设置出生日期  
	 * @param birth 出生日期  
	 */  
	public void setBirth(java.lang.String birth) {
		this.birth = birth;
	}
	
	/**  
	 * 获取出生日期   
	 * @return birth 出生日期   
	 */
	public java.lang.String getBirth() {
		return this.birth;
	}
	/**  
	 * 设置有效期起始时间  
	 * @param start_date 有效期起始时间  
	 */  
	public void setStart_date(java.lang.String start_date) {
		this.start_date = start_date;
	}
	
	/**  
	 * 获取有效期起始时间   
	 * @return start_date 有效期起始时间   
	 */
	public java.lang.String getStart_date() {
		return this.start_date;
	}
	/**  
	 * 设置有效期结束时间  
	 * @param end_date 有效期结束时间  
	 */  
	public void setEnd_date(java.lang.String end_date) {
		this.end_date = end_date;
	}
	
	/**  
	 * 获取有效期结束时间   
	 * @return end_date 有效期结束时间   
	 */
	public java.lang.String getEnd_date() {
		return this.end_date;
	}
	/**  
	 * 设置签发机关  
	 * @param issue 签发机关  
	 */  
	public void setIssue(java.lang.String issue) {
		this.issue = issue;
	}
	
	/**  
	 * 获取签发机关   
	 * @return issue 签发机关   
	 */
	public java.lang.String getIssue() {
		return this.issue;
	}
	/**  
	 * 设置创建时间  
	 * @param create_time 创建时间  
	 */  
	public void setCreate_time(java.util.Date create_time) {
		this.create_time = create_time;
	}
	
	/**  
	 * 获取创建时间   
	 * @return create_time 创建时间   
	 */
	public java.util.Date getCreate_time() {
		return this.create_time;
	}
	/**  
	 * 设置更新时间  
	 * @param update_time 更新时间  
	 */  
	public void setUpdate_time(java.util.Date update_time) {
		this.update_time = update_time;
	}
	
	/**  
	 * 获取更新时间   
	 * @return update_time 更新时间   
	 */
	public java.util.Date getUpdate_time() {
		return this.update_time;
	}
	
	private EtcUser etcUser;
	
	public void setEtcUser(EtcUser etcUser){
		this.etcUser = etcUser;
	}
	
	public EtcUser getEtcUser() {
		return etcUser;
	}

	@Override
    public String toString() {
		return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
			.append("id",getId())
			.append("user_id",getUser_id())
			.append("address",getAddress())
			.append("name",getName())
			.append("nationality",getNationality())
			.append("num",getNum())
			.append("sex",getSex())
			.append("birth",getBirth())
			.append("start_date",getStart_date())
			.append("end_date",getEnd_date())
			.append("issue",getIssue())
			.append("create_time",getCreate_time())
			.append("update_time",getUpdate_time())
			.toString();
	}
	
	@Override
    public int hashCode() {
		return new HashCodeBuilder()
			.append(getId())
			.toHashCode();
	}
	
	@Override
    public boolean equals(Object obj) {
		if(obj instanceof EtcIdcard == false) {
			return false;
		}
		if(this == obj) {
			return true;
		}
		EtcIdcard other = (EtcIdcard)obj;
		return new EqualsBuilder()
			.append(getId(),other.getId())
			.isEquals();
	}
}

